#pragma once

#include <opencv2\opencv.hpp>

using namespace cv;

class ERForest
{
private:
	CvERTrees ertrees;

public:

	void set_trainer(CvERTrees ertrees)
	{
		this->ertrees = ertrees;
	}

	CvERTrees get_trainer()
	{
		return ertrees;
	}

	void train(Mat& data, Mat& label, CvRTParams params)
	{
		ertrees.train(data, CV_ROW_SAMPLE, label, Mat(), Mat(), Mat(), Mat(), params);
	}

	float predict(const Mat& sample)
	{
		return ertrees.predict(sample);
	}
};